{include file="public_head" /}

<!-- datatables -->
<link href="__STATIC__/js/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css"/>
<!-- chk_3 -->
<link href="__STATIC__/css/chk_3.css" rel="stylesheet" type="text/css"/>
<!-- Select2 -->
<link href="__STATIC__/css/select/select2.min.css" rel="stylesheet">
<body class="nav-md">

<div class="container body">


    <div class="main_container">

        {include file="public_sidebar,public_nav" /}

        <!-- page content -->
        <div class="right_col" role="main">
            <div class="">
                <div class="page-title">
                    <div class="title_left">
                        <h3>

                        </h3>
                    </div>
                </div>
                <div class="clearfix"></div>

                <div class="row">

                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>代存轮胎</h2>
                                <a style="float: right" href="{:url('create')}"
                                   class="btn btn-success btn-sm">创建订单</a>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">
                                <form name="form" id="form" method="get" action="">
                                    <div class="title_left">
                                        <div class="input-group m" style="float: left;">

                                            <select name="auding_statusf" id="status" class="select2_single" style="width: 180px;"
                                                    tabindex="-1">
                                                <option value="0">- (确认寄存)审核状态 -</option>
                                                <option value="1" {eq name=':input("auding_statusf")' value='1' }selected{/eq}>等待审核</option>
                                                <option value="2" {eq name=':input("auding_statusf")' value='2' }selected{/eq}>审核成功</option>
                                                <option value="3" {eq name=':input("auding_statusf")' value='3' }selected{/eq}>审核失败</option>
                                            </select>
                                        </div>
                                        <div class="input-group m" style="float: left;">

                                            <select name="auding_status1f" id="status" class="select2_single" style="width: 180px;"
                                                    tabindex="-1">
                                                <option value="0">- 一级审核 -</option>
                                                <option value="1" {eq name=':input("auding_status1f")' value='1' }selected{/eq}>等待审核</option>
                                                <option value="2" {eq name=':input("auding_status1f")' value='2' }selected{/eq}>审核成功</option>
                                                <option value="3" {eq name=':input("auding_status1f")' value='3' }selected{/eq}>审核失败</option>
                                            </select>
                                        </div>
                                        <div class="input-group m" style="float: left;">

                                            <select name="auding_status2f" id="status" class="select2_single" style="width: 180px;"
                                                    tabindex="-1">
                                                <option value="0">- 二级审核 -</option>
                                                <option value="1" {eq name=':input("auding_status2f")' value='1' }selected{/eq}>等待审核</option>
                                                <option value="2" {eq name=':input("auding_status2f")' value='2' }selected{/eq}>审核成功</option>
                                                <option value="3" {eq name=':input("auding_status2f")' value='3' }selected{/eq}>审核失败</option>
                                            </select>
                                        </div>
                                        <div class="input-group m" style="float: left;">

                                            <select name="auding_status3f" id="status" class="select2_single" style="width: 180px;"
                                                    tabindex="-1">
                                                <option value="0">- 三级审核 -</option>
                                                <option value="1" {eq name=':input("auding_status3f")' value='1' }selected{/eq}>等待审核</option>
                                                <option value="2" {eq name=':input("auding_status3f")' value='2' }selected{/eq}>审核成功</option>
                                                <option value="3" {eq name=':input("auding_status3f")' value='3' }selected{/eq}>审核失败</option>
                                            </select>
                                        </div>
                                        <div class="input-group m" style="float: left;">

                                            <select name="auding_statusq" id="status" class="select2_single" style="width: 180px;"
                                                    tabindex="-1">
                                                <option value="0">- (确认取走)审核状态 -</option>
                                                <option value="1" {eq name=':input("auding_statusq")' value='1' }selected{/eq}>等待审核</option>
                                                <option value="2" {eq name=':input("auding_statusq")' value='2' }selected{/eq}>审核成功</option>
                                                <option value="3" {eq name=':input("auding_statusq")' value='3' }selected{/eq}>审核失败</option>
                                            </select>
                                        </div>
                                        <div class="input-group m" style="float: left;">

                                            <select name="auding_status1q" id="status" class="select2_single" style="width: 180px;"
                                                    tabindex="-1">
                                                <option value="0">- 一级审核 -</option>
                                                <option value="1" {eq name=':input("auding_status1q")' value='1' }selected{/eq}>等待审核</option>
                                                <option value="2" {eq name=':input("auding_status1q")' value='2' }selected{/eq}>审核成功</option>
                                                <option value="3" {eq name=':input("auding_status1q")' value='3' }selected{/eq}>审核失败</option>
                                            </select>
                                        </div>
                                        <div class="input-group m" style="float: left;">

                                            <select name="auding_status2q" id="status" class="select2_single" style="width: 180px;"
                                                    tabindex="-1">
                                                <option value="0">- 二级审核 -</option>
                                                <option value="1" {eq name=':input("auding_status2q")' value='1' }selected{/eq}>等待审核</option>
                                                <option value="2" {eq name=':input("auding_status2q")' value='2' }selected{/eq}>审核成功</option>
                                                <option value="3" {eq name=':input("auding_status2q")' value='3' }selected{/eq}>审核失败</option>
                                            </select>
                                        </div>
                                        <div class="input-group m" style="float: left;">

                                            <select name="auding_status3q" id="status" class="select2_single" style="width: 180px;"
                                                    tabindex="-1">
                                                <option value="0">- 三级审核 -</option>
                                                <option value="1" {eq name=':input("auding_status3q")' value='1' }selected{/eq}>等待审核</option>
                                                <option value="2" {eq name=':input("auding_status3q")' value='2' }selected{/eq}>审核成功</option>
                                                <option value="3" {eq name=':input("auding_status3q")' value='3' }selected{/eq}>审核失败</option>
                                            </select>
                                        </div>


                                        {eq name='$auding_status' value="2"}
                                        <div class="input-group" style="float: left;margin: 0 20px;">

                                            <select name="shop_id" id="status1" class="select2_single" style="width: 200px;"
                                                    tabindex="-1">
                                                <option value="0">- 全部门店 -</option>
                                                {volist name="$shop_list" id="item"}
                                                <option value="{$item.id}" {eq name=':input("shop_id")' value='$item.id' }selected{/eq}>{$item.shop_title}</option>
                                                {/volist}
                                            </select>
                                        </div>
                                        {/eq}
                                        <div class="input-group m" style="float: left;">

                                            <select name="take_tyre" id="status" class="select2_single" style="width: 180px;"
                                                    tabindex="-1">
                                                <option value="0">- 寄存状态 -</option>
                                                <option value="5" {eq name=':input("take_tyre")' value='5' }selected{/eq}>等待审核</option>
                                                <option value="3" {eq name=':input("take_tyre")' value='3' }selected{/eq}>前台确认寄存</option>
                                                <option value="1" {eq name=':input("take_tyre")' value='1' }selected{/eq}>已寄存</option>
                                                <option value="4" {eq name=':input("take_tyre")' value='4' }selected{/eq}>前台确认取走</option>
                                                <option value="2" {eq name=':input("take_tyre")' value='2' }selected{/eq}>已取走</option>

                                            </select>
                                        </div>

                                        <div class="col-md-2 col-sm-3 col-xs-12 form-group pull-left top_search">

                                            <div class="input-group">
                                                <input type="text" class="form-control" name="title"
                                                       placeholder="输入搜索内容..." value="{:input('title')}">
                                            </div>

                                        </div>
                                        <button type="submit" class="btn btn-primary" style="margin-left: 10px;">搜 索</button>
                                    </div>
                                    <style>
                                        .m{margin:0 6px;}
                                    </style>
                                    <table style="border-bottom:1px solid #ddd;"
                                           class="table table-striped table-bordered table-hover">
                                        <thead>
                                        <tr class="success">
                                            <!--<th style="width: 2%; padding: 10px;">-->
                                                <!--<input type="checkbox" class="checkall"-->
                                                       <!--onclick="CheckAll(this.checked);"/>-->
                                            <!--</th>-->
                                            <!--<th>排序</th>-->
                                            <th width="30">ID</th>
                                            <th>订单号</th>
                                            <th>寄存金额</th>
                                            <th>用户账号</th>
                                            <th>车牌号</th>
                                            <th>寄存时间</th>
                                            <th>寄存门店</th>
                                            <th>订单状态</th>
                                            <th>是否取走</th>
                                            <th>取走时间</th>
                                            {in name=":session('role_id')" value="1,2,11,12,13"}
                                            <th>(确认寄存)审核状态</th><th>一级审核</th><th>二级审核</th><th>三级审核</th>
                                            <th>(确认取走)审核状态</th><th>一级审核</th><th>二级审核</th><th>三级审核</th>
                                            {/in}
                                            <th>操作</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        {empty name="data"}
                                            <tr><td colspan="12"><div style='font-size:24px;margin:30px 0;'>没有找到记录</div></td></tr>
                                        {/empty}
                                        {volist name="data" id="item"}
                                        <tr >
                                            <td>{$item.id}</td>
                                            <td>{$item.order_number}</td>
                                            <td>{$item.amount}</td>
                                            <td>{$item.username}</td>
                                            <td>{$item.car_number}</td>
                                            <td>{$item.start_time}-{$item.end_time}</td>
                                            <td>{php} echo db('shop')->where('id',$item['shop_id'])->value('shop_title');{/php}</td>
                                            <td>{switch name="$item.status"}
                                                {case 50}等待沟通{/case}
                                                {case 1}未支付{/case}
                                                {case 6}进行中(已支付){/case}
                                                {case 5}已确认{/case}
                                                {case 4}已评价{/case}
                                                {case 10}退款中{/case}
                                                {case 11}退款成功{/case}
                                                {case 12}退款失败{/case}
                                                {case 20}取消订单{/case}
                                                {/switch}
                                            </td>
                                            <td>
                                                {switch name="$item.take_tyre"}
                                                {case 5}等待审核{/case}
                                                {case 3}前台确认轮胎是否已寄存{/case}
                                                {case 1}已寄存{/case}
                                                {case 4}前台确认轮胎是否已取走{/case}
                                                {case 2}已取走{/case}
                                                {/switch}
                                            </td>
                                            <td>{$item.take_tyre_time}</td>
                                            {in name=":session('role_id')" value="1,2,11,12,13"}
                                            {eq name="$item.single_id" value="11"}
                                            <td class="td0">

                                                {switch name="$item.auding_statusf"}
                                                {case 1}等待审核{/case}
                                                {case 2}审核成功{/case}
                                                {case 3}审核失败{/case}
                                                {/switch}
                                            </td>
                                            <td class="td1">
                                                {switch name="$item.auding_status1f"}
                                                {case 1}等待审核{/case}
                                                {case 2}审核成功{/case}
                                                {case 3}审核失败{/case}
                                                {/switch}
                                            </td>
                                            <td class="td2">
                                                {switch name="$item.auding_status2f"}
                                                {case 1}等待审核{/case}
                                                {case 2}审核成功{/case}
                                                {case 3}审核失败{/case}
                                                {/switch}
                                            </td>
                                            <td class="td3">
                                                {switch name="$item.auding_status3f"}
                                                {case 1}等待审核{/case}
                                                {case 2}审核成功{/case}
                                                {case 3}审核失败{/case}
                                                {/switch}
                                            </td>
                                            <td class="td0">
                                                {switch name="$item.auding_statusq"}
                                                {case 1}等待审核{/case}
                                                {case 2}审核成功{/case}
                                                {case 3}审核失败{/case}
                                                {/switch}
                                            </td>
                                            <td class="td1">
                                                {switch name="$item.auding_status1q"}
                                                {case 1}等待审核{/case}
                                                {case 2}审核成功{/case}
                                                {case 3}审核失败{/case}
                                                {/switch}
                                            </td>
                                            <td class="td2">
                                                {switch name="$item.auding_status2q"}
                                                {case 1}等待审核{/case}
                                                {case 2}审核成功{/case}
                                                {case 3}审核失败{/case}
                                                {/switch}
                                            </td>
                                            <td class="td3">
                                                {switch name="$item.auding_status3q"}
                                                {case 1}等待审核{/case}
                                                {case 2}审核成功{/case}
                                                {case 3}审核失败{/case}
                                                {/switch}
                                            </td>
                                            {/eq}
                                            {/in}
                                            <td class="operate" >
                                                <div>
                                                    <a href="{:url('service_order/update', ['id' => $item['id']])}"
                                                       class="label label-primary">
                                                        <span class="fa fa-pencil"></span>&nbsp;&nbsp;编 辑
                                                    </a>
                                                    <a href="{:url('service_order/update', ['id' => $item['id'],'table' =>1])}"
                                                       class="label label-success" style="margin-left: 10px;">
                                                        <span class="fa fa-pencil"></span>&nbsp;&nbsp;打印提成
                                                    </a>
                                                    <!--<a href="{:url('destroy', ['id' => $item['id']])}"-->
                                                       <!--class="label label-danger"-->
                                                       <!--onClick="return confirm('确定删除吗?')"-->
                                                    <!--&gt;-->
                                                        <!--<span class="fa fa-times"></span>&nbsp;&nbsp;删 除-->
                                                    <!--</a>-->
                                                    <!--<a href="{:url('update', ['id' => $item['id']])}"-->
                                                       <!--class="label label-success">-->
                                                        <!--<span class="fa fa-pencil"></span>&nbsp;&nbsp;审 核-->
                                                    <!--</a>-->

                                                </div>
                                            </td>
                                        </tr>
                                        {/volist}
                                        </tbody>

                                    </table>
                                    <div style="float: right;margin-top: -30px;">{$data->render()}</div>
                                    <button type="button" class="btn btn-success" style="margin-top: 20px;" onclick="dcd()">轮胎寄存导出</button>
                                </form>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

        </div>
        <!-- /page content -->
    </div>

</div>

{include file="public_foot" /}
<script src="__STATIC__/js/select/select2.full.min.js"></script>
<!-- public -->
<script src="__STATIC__/js/public.js"></script>
<!-- layer -->
<script src="__STATIC__/js/layer.js"></script>
<script type="text/javascript">
    // list
    $('[name="status"]').change(function(){
        //form.submit();
        $('form').submit();
    });
    $(document).ready(function () {
        // select2
        $(".select2_single").select2({
            placeholder: "请选择分类",
            allowClear: true
        });
    });
    function dcd(){
        var title = "{:input('title')}";
        window.location.href = "{:url('daochu')}?export=1&pages=100000&title="+title;
    }
</script>